<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>XenC: Mode Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">XenC
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Open-source tool for data selection in NLP</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="class_mode-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Mode Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Filtering modes interface.  
 <a href="class_mode.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="mode_8h_source.html">mode.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Mode:</div>
<div class="dyncontent">
<div class="center"><img src="class_mode__inherit__graph.png" border="0" usemap="#_mode_inherit__map" alt="Inheritance graph"/></div>
<map name="_mode_inherit__map" id="_mode_inherit__map">
<area shape="rect" id="node2" href="class_bi_x_entropy.html" title="Filtering mode 3: bilingual cross&#45;entropy. " alt="" coords="5,79,93,104"/>
<area shape="rect" id="node3" href="class_mono_x_entropy.html" title="Filtering mode 2: monolingual cross&#45;entropy. " alt="" coords="117,79,227,104"/>
<area shape="rect" id="node4" href="class_p_t_scoring.html" title="Filtering mode 4: phrase&#45;table cross&#45;entropy. " alt="" coords="250,79,334,104"/>
<area shape="rect" id="node5" href="class_simple_p_p_l.html" title="Filtering mode 1: simple perplexity. " alt="" coords="358,79,445,104"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af43f7539ee52f4ffa38e532fa1144ef2"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mode.html#af43f7539ee52f4ffa38e532fa1144ef2">launch</a> ()=0</td></tr>
<tr class="memdesc:af43f7539ee52f4ffa38e532fa1144ef2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual function in charge of launching the implemented mode.  <a href="#af43f7539ee52f4ffa38e532fa1144ef2">More...</a><br /></td></tr>
<tr class="separator:af43f7539ee52f4ffa38e532fa1144ef2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8876d05ec6622862d06880fa55c590ab"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mode.html#a8876d05ec6622862d06880fa55c590ab">~Mode</a> ()=0</td></tr>
<tr class="memdesc:a8876d05ec6622862d06880fa55c590ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pure virtual destructor.  <a href="#a8876d05ec6622862d06880fa55c590ab">More...</a><br /></td></tr>
<tr class="separator:a8876d05ec6622862d06880fa55c590ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a4f9db1a2844c3f9be520c2882446443a"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mode.html#a4f9db1a2844c3f9be520c2882446443a">findSampleSize</a> (boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt; idCorp, boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt; oodCorp)</td></tr>
<tr class="memdesc:a4f9db1a2844c3f9be520c2882446443a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the optimal sample size for the OOD <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a>.  <a href="#a4f9db1a2844c3f9be520c2882446443a">More...</a><br /></td></tr>
<tr class="separator:a4f9db1a2844c3f9be520c2882446443a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08d61f2bf10a36780a805fd64f43886d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_corpus.html">Corpus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mode.html#a08d61f2bf10a36780a805fd64f43886d">extractSample</a> (boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt; ptrCorp, int sSize, bool mean)</td></tr>
<tr class="memdesc:a08d61f2bf10a36780a805fd64f43886d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts a random sample from a give <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a>.  <a href="#a08d61f2bf10a36780a805fd64f43886d">More...</a><br /></td></tr>
<tr class="separator:a08d61f2bf10a36780a805fd64f43886d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Filtering modes interface. </p>
<p>This class takes the role of an interface to the various XenC filtering modes. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8876d05ec6622862d06880fa55c590ab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Mode::~Mode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pure virtual destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a08d61f2bf10a36780a805fd64f43886d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_corpus.html">Corpus</a> Mode::extractSample </td>
          <td>(</td>
          <td class="paramtype">boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt;&#160;</td>
          <td class="paramname"><em>ptrCorp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>mean</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Extracts a random sample from a give <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ptrCorp</td><td>: <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> from which the sample should be extracted </td></tr>
    <tr><td class="paramname">sSize</td><td>: size of the sample to extract </td></tr>
    <tr><td class="paramname">mean</td><td>: true if we are in "mean" mode (not the same <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> filename) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>extracted <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> sample </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_mode_a08d61f2bf10a36780a805fd64f43886d_cgraph.png" border="0" usemap="#class_mode_a08d61f2bf10a36780a805fd64f43886d_cgraph" alt=""/></div>
<map name="class_mode_a08d61f2bf10a36780a805fd64f43886d_cgraph" id="class_mode_a08d61f2bf10a36780a805fd64f43886d_cgraph">
<area shape="rect" id="node2" href="class_corpus.html#aa91047a62e185b5bb09ba3e5ed651b5a" title="Accessor to the number of tokens of the Corpus. " alt="" coords="230,5,342,31"/>
<area shape="rect" id="node3" href="namespace_xen_common.html#a3b2d08955355a35d07efd74c466b91d1" title="Template converting a value into a string with no precision. " alt="" coords="206,55,366,80"/>
<area shape="rect" id="node4" href="namespace_xen_common.html#ad4f4868634e46d6ee82e57d343a77abe" title="Template converting a value into a string with a precision of 20. " alt="" coords="210,104,362,129"/>
<area shape="rect" id="node5" href="namespace_xen_common.html#a256a94d06d5072213efb1c50412f64bd" title="Computes the word count of a string. " alt="" coords="201,153,372,179"/>
<area shape="rect" id="node6" href="class_corpus.html#a36c00f8d5dca53085d3d912cefdd2de8" title="Initialization function from an already instanciated XenFile. " alt="" coords="227,203,346,228"/>
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_mode_a08d61f2bf10a36780a805fd64f43886d_icgraph.png" border="0" usemap="#class_mode_a08d61f2bf10a36780a805fd64f43886d_icgraph" alt=""/></div>
<map name="class_mode_a08d61f2bf10a36780a805fd64f43886d_icgraph" id="class_mode_a08d61f2bf10a36780a805fd64f43886d_icgraph">
<area shape="rect" id="node2" href="class_bi_x_entropy.html#a55ad423050eae54a09ce73ca24598ca4" title="Function in charge of launching the filtering mode. " alt="" coords="211,5,346,31"/>
<area shape="rect" id="node3" href="class_mono_x_entropy.html#ab82ba430051ad6ca073f9f4f74dc25ae" title="Function in charge of launching the filtering mode. " alt="" coords="201,55,357,80"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4f9db1a2844c3f9be520c2882446443a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Mode::findSampleSize </td>
          <td>(</td>
          <td class="paramtype">boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt;&#160;</td>
          <td class="paramname"><em>idCorp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt;&#160;</td>
          <td class="paramname"><em>oodCorp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Finds the optimal sample size for the OOD <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">idCorp</td><td>: in-domain <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> </td></tr>
    <tr><td class="paramname">oodCorp</td><td>: out-of-domain <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>size of the required <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> sample in percentage of the whole one </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_mode_a4f9db1a2844c3f9be520c2882446443a_icgraph.png" border="0" usemap="#class_mode_a4f9db1a2844c3f9be520c2882446443a_icgraph" alt=""/></div>
<map name="class_mode_a4f9db1a2844c3f9be520c2882446443a_icgraph" id="class_mode_a4f9db1a2844c3f9be520c2882446443a_icgraph">
<area shape="rect" id="node2" href="class_bi_x_entropy.html#a55ad423050eae54a09ce73ca24598ca4" title="Function in charge of launching the filtering mode. " alt="" coords="219,5,354,31"/>
<area shape="rect" id="node3" href="class_mono_x_entropy.html#ab82ba430051ad6ca073f9f4f74dc25ae" title="Function in charge of launching the filtering mode. " alt="" coords="208,55,364,80"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="af43f7539ee52f4ffa38e532fa1144ef2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Mode::launch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Virtual function in charge of launching the implemented mode. </p>

<p>Implemented in <a class="el" href="class_bi_x_entropy.html#a55ad423050eae54a09ce73ca24598ca4">BiXEntropy</a>, <a class="el" href="class_mono_x_entropy.html#ab82ba430051ad6ca073f9f4f74dc25ae">MonoXEntropy</a>, <a class="el" href="class_p_t_scoring.html#a51b8eadcb3b7fa0264c09b3a0908f2c0">PTScoring</a>, and <a class="el" href="class_simple_p_p_l.html#a0cbcec72a693b6bf700c3d1802026be1">SimplePPL</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/<a class="el" href="mode_8h_source.html">mode.h</a></li>
<li>src/<a class="el" href="mode_8cpp.html">mode.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 18 2016 17:22:37 for XenC by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
